package com.ruoyi.records.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 借阅记录对象 borrow_records
 * 
 * @author anyunyi
 * @date 2025-05-28
 */
public class BorrowRecords extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 借阅ID（格式：YR+14位时间戳） */
    private String id;

    /** 读者ID（关联users表） */
    @Excel(name = "读者ID", readConverterExp = "关=联users表")
    private Long userId;

    /** 图书ID（关联books表） */
    @Excel(name = "图书ID", readConverterExp = "关=联books表")
    private Long bookId;

    /** 借阅时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "借阅时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date borrowTime;

    /** 应还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "应还时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dueTime;

    /** 实际归还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际归还时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date returnTime;

    /** 滞纳金（元） */
    @Excel(name = "滞纳金", readConverterExp = "元=")
    private BigDecimal fine;

    /** 状态（1-借阅中，2-已归还，3-超期） */
    @Excel(name = "状态", readConverterExp = "1=-借阅中，2-已归还，3-超期")
    private Long status;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setBookId(Long bookId) 
    {
        this.bookId = bookId;
    }

    public Long getBookId() 
    {
        return bookId;
    }
    public void setBorrowTime(Date borrowTime) 
    {
        this.borrowTime = borrowTime;
    }

    public Date getBorrowTime() 
    {
        return borrowTime;
    }
    public void setDueTime(Date dueTime) 
    {
        this.dueTime = dueTime;
    }

    public Date getDueTime() 
    {
        return dueTime;
    }
    public void setReturnTime(Date returnTime) 
    {
        this.returnTime = returnTime;
    }

    public Date getReturnTime() 
    {
        return returnTime;
    }
    public void setFine(BigDecimal fine) 
    {
        this.fine = fine;
    }

    public BigDecimal getFine() 
    {
        return fine;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("bookId", getBookId())
            .append("borrowTime", getBorrowTime())
            .append("dueTime", getDueTime())
            .append("returnTime", getReturnTime())
            .append("fine", getFine())
            .append("status", getStatus())
            .toString();
    }
}
